<% @main_header = "#{link_to('Ptrack:', '/')} #{@project.name if @project}: Notes" %>

<div style="color:red;">
<%= error_messages_for :note %>
</div>

<% form_for :note, @note, :url => {:action => 'update', :id => @note}, :html => {:method => :put} do |f| %>
<div style="float: left; width: 100%;">
<fieldset>
<legend>Note Options</legend>
<table style="width:47%; float:left;" cellspacing="0" cellpadding="0">
		
	<tr>
		<td>
			<%= f.label :title, 'Note Title:' %>
		</td>
		<td>
			<%= f.text_field :title, :style => "width:197px;"%>
		</td>
	</tr>

    <tr>
		<td>
			<%= label :contact_id, 'Contact:' %>
		</td>
		<td>
			<% #f.select :contact_id, Contact.find(:all).collect{|c| [c.full_name, c.id]}, {:prompt=> "Select Contact ..."}, {:style =>"width:200px;"} %>			
		
			<%= select "contact", "contact_id", Contact.find(:all).collect{|c| [c.full_name, c.id]}, {:include_blank => 'Select a Contact...', :style =>"width:200px;"} %>	
			
		</td>
	</tr>
</table>

<table style="width:50%;" cellspacing="0" cellpadding="0">
	<tr>
		<td rowspan="4" style="vertical-align:top;">
			<%= f.label :body, 'Note:' %>
		</td>
		<td rowspan="4">
			<%= f.text_area :body, {:style => "width:350px; height:140px;"} %>			
		</td>
	</tr>
</table>
</fieldset>
</div>
<br/>
<table style="width: 100%;">
	<tr>
		<td style="text-align: right; width: 50%;">
			<%= f.submit "Update Note" %>
		</td>
		

<% end %>

<td style="text-align: left; width: 50%;">
		<%= button_to "Cancel", :action => "list" %>
		</td>
	</tr>
</table>
